This application is based on Japanese Patent Application No. 11-185953 filed in Japan, the contents of which are hereby incorporated by reference.
1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a recording medium recorded with an image processing program. Particularly, the present invention relates to an image processing apparatus, an image processing method, and a recording medium recorded with an image processing program suited to improve picture quality of an image input using a digital camera or an image scanner.
2. Description of the Related Art
When a document is read using a digital camera, an image scanner, or the like, a predetermined image process is applied on the image of the document read in. A document generally includes a text region, a line copy region, a photograph region and a half tone dot region. Here, a text region refers to a rectangular region formed only of text of black characters. A line copy region refers to a rectangular region formed mainly of a single color region and an edge region such as a bar graph or a solid image. A photograph region refers to a rectangular region including many areas of varying tone. Paintings, illustrations and texture are included in the photograph region. A half tone dot region refers to a rectangular region represented by dots such as a picture in the newspaper.
It is desirable to apply a different image process and compression method on respective regions of the text, photograph, line copy and half tone dot in the case of improving the picture quality of the image or compressing the image of the document. Therefore, respective regions must be identified from the document. Edge extraction and histogram analysis are employed for this identification, using various threshold values.
As the image process applied on respective regions, a binarization process is applied on a text region whereas a subtractive color process of integrating similar colors to reduce the colors is applied on a line copy region. The subtractive color process is effective when the color that can be represented in the output device such as the printer or display is limited or when carrying out compression. An edge enhancement process, smoothing process, or tone correction process is carried out on photograph and half tone dot regions. In these image processes such as the edge enhancement process, the density gradient is compared with a threshold value for edge extraction. In the subtractive color process, the color distance is compared with a threshold value to determine similarity of the colors.
In a document obtained by a digital camera or the like, the image pickup condition such as the shooting range or illumination is not constant. The resolution, dynamic range, the background luminance and the like of the obtained document differ at every image pickup. It is therefore necessary to modify the threshold value employed in the image process applied on the document according to variation in the image pickup condition. The necessity of modifying the threshold value occurs also when the quality of the sheet of the document or the printout quality differs in addition to difference in the image pickup condition of a digital camera or the like.
An edge extraction method of determining the threshold value according to the histogram of the valley depth of the luminance, chroma saturation or RGB chromaticity is disclosed in Japanese Patent Laying-Open No. 6-259550. The threshold value is determined from the distribution of the valley depth of luminance, chroma saturation or RGB chromaticity.
An image reader apparatus that carries out a different process for each region is disclosed in Japanese Patent Laying-Open No. 10-285396. This image reader apparatus carries out the steps of extracting a text region and other regions included in the document, applying a simple binarization process on the text region with priority on the resolution, applying a dither process on a photograph region with priority on the tone, and selecting a compression method for each region.
In the edge extraction method of the aforementioned Japanese Patent Laying-Open No. 6-259550, it is difficult to determine the optimum threshold value since the distribution of luminance, chroma saturation, and RGB chromaticity varies depending upon the ratio of the characters included in the document, the contrast, and the like.
The tone or tint of the document generally varies depending upon difference in the document and the image pickup condition. If a binarization process is carried out aiming to improve the picture quality of the text region or to recognize the text, the background area of the text region will be reproduced as no-print white. There was a problem that the boundary of the background area included in a photograph region or the like adjacent to the text region will be noticeable. This problem is also seen in the case where the sheet itself is slightly colored such as the sheet of a newspaper.
The image reader apparatus disclosed in the aforementioned Japanese Patent Laying-Open No. 10-285396 is based on a contact type line sensor. The event of the background becoming darker due to insufficient lighting is not taken into account. Variation in the image pickup environment does not occur. However, there is the problem that the boundary of the background area included in a photograph region or the like is noticeable when a binarization process is applied on the text region.
In view of the foregoing, an object of the present invention is to provide an image processing apparatus, an image processing method, and a recording medium recorded with an image processing program that can carry out a region determination process and correction process appropriately according to difference in the sheet quality or image pickup condition.
According to an aspect of the present invention, an image processing apparatus includes a reception unit receiving image data, an extraction unit to extract a first region from the received image data, a calculation unit to calculate the background amount of the extracted first region, and a correction unit to correct a second region of the image data according to the calculated background amount.
According to the present invention, an image processing apparatus that can carry out an appropriate correction process according to difference in the sheet quality and image pickup condition can be provided.
According to another aspect of the present invention, an image processing method includes the steps of receiving image data, extracting a first region from the received image data, calculating the background amount of the extracted first region, and correcting a second region of the image data according to the calculated background amount.
According to the present invention, an image processing method can be provided that can carry out an appropriate correction method according to difference in the sheet quality and image pickup condition.
According to a further aspect of the present invention, a computer-readable recording medium is recorded with an image processing program for the computer to execute the steps of receiving image data, extracting a first region from the received image data, calculating the background amount of the extracted first region, and correcting a second region of the image data according to the calculated background amount.
According to the present invention, a computer-readable recording medium can be provided recorded with an image processing program that allows the computer to execute an appropriate correction process according to difference in the sheet quality and image pickup condition.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.